/*
*  包含多个更新state函数的对象
* */
import {ADD, ASYNC, ODDINCREASEEVEN, REDUCE} from "./mutations-type";

export default {
  //更新state中的count：增加
  [ADD](state) {
    state.count++
  },
  //更新state中的count：减少
  [REDUCE](state) {
    state.count--
  },
  [ODDINCREASEEVEN](state) {
    state.count % 2 === 1 ? state.count++ : state.count
  },
  [ASYNC](state){
    state.count++
  }

}

